From bee6f66b5e393213d328afd14a9ac4cb926a0b9f Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sat, 3 Nov 2001 00:44:35 +0000 Subject: [PATCH] Correct some renamed functions. 2001-11-03 Tor Lillqvist * gtk/gtk.def: Correct some renamed functions. * gtk/gtkimmodule.c (correct_libdir_prefix): New function, used on Windows to turn build-time paths from a gtk.immodules distributed as part of a binary package into runtime ones in the end-user-chosen installation directory. (gtk_im_module_init): Use it for module path and domain directory. --- ChangeLog | 7 +++++++ ChangeLog.pre-2-0 | 7 +++++++ ChangeLog.pre-2-10 | 7 +++++++ ChangeLog.pre-2-2 | 7 +++++++ ChangeLog.pre-2-4 | 7 +++++++ ChangeLog.pre-2-6 | 7 +++++++ ChangeLog.pre-2-8 | 7 +++++++ gtk/gtk.def | 6 ++---- gtk/gtkimmodule.c | 29 +++++++++++++++++++++++++++++ 9 files changed, 80 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 86286a3802..dfedd01817 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,13 @@ * gtk/gtk.def: Add a couple of missing entry points. (#63585) + * gtk/gtkimmodule.c (correct_libdir_prefix): New function, used on + Windows to turn build-time paths from a gtk.immodules distributed + as part of a binary package into runtime ones in the + end-user-chosen installation directory. + (gtk_im_module_init): Use it for module path and domain + directory. + 2001-11-02 Tor Lillqvist * gtk/gtkrc.c (gtk_rc_make_default_dir): Fix typo: extraneous diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 86286a3802..dfedd01817 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -7,6 +7,13 @@ * gtk/gtk.def: Add a couple of missing entry points. (#63585) + * gtk/gtkimmodule.c (correct_libdir_prefix): New function, used on + Windows to turn build-time paths from a gtk.immodules distributed + as part of a binary package into runtime ones in the + end-user-chosen installation directory. + (gtk_im_module_init): Use it for module path and domain + directory. + 2001-11-02 Tor Lillqvist * gtk/gtkrc.c (gtk_rc_make_default_dir): Fix typo: extraneous diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 86286a3802..dfedd01817 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -7,6 +7,13 @@ * gtk/gtk.def: Add a couple of missing entry points. (#63585) + * gtk/gtkimmodule.c (correct_libdir_prefix): New function, used on + Windows to turn build-time paths from a gtk.immodules distributed + as part of a binary package into runtime ones in the + end-user-chosen installation directory. + (gtk_im_module_init): Use it for module path and domain + directory. + 2001-11-02 Tor Lillqvist * gtk/gtkrc.c (gtk_rc_make_default_dir): Fix typo: extraneous diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 86286a3802..dfedd01817 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -7,6 +7,13 @@ * gtk/gtk.def: Add a couple of missing entry points. (#63585) + * gtk/gtkimmodule.c (correct_libdir_prefix): New function, used on + Windows to turn build-time paths from a gtk.immodules distributed + as part of a binary package into runtime ones in the + end-user-chosen installation directory. + (gtk_im_module_init): Use it for module path and domain + directory. + 2001-11-02 Tor Lillqvist * gtk/gtkrc.c (gtk_rc_make_default_dir): Fix typo: extraneous diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 86286a3802..dfedd01817 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -7,6 +7,13 @@ * gtk/gtk.def: Add a couple of missing entry points. (#63585) + * gtk/gtkimmodule.c (correct_libdir_prefix): New function, used on + Windows to turn build-time paths from a gtk.immodules distributed + as part of a binary package into runtime ones in the + end-user-chosen installation directory. + (gtk_im_module_init): Use it for module path and domain + directory. + 2001-11-02 Tor Lillqvist * gtk/gtkrc.c (gtk_rc_make_default_dir): Fix typo: extraneous diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 86286a3802..dfedd01817 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -7,6 +7,13 @@ * gtk/gtk.def: Add a couple of missing entry points. (#63585) + * gtk/gtkimmodule.c (correct_libdir_prefix): New function, used on + Windows to turn build-time paths from a gtk.immodules distributed + as part of a binary package into runtime ones in the + end-user-chosen installation directory. + (gtk_im_module_init): Use it for module path and domain + directory. + 2001-11-02 Tor Lillqvist * gtk/gtkrc.c (gtk_rc_make_default_dir): Fix typo: extraneous diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 86286a3802..dfedd01817 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -7,6 +7,13 @@ * gtk/gtk.def: Add a couple of missing entry points. (#63585) + * gtk/gtkimmodule.c (correct_libdir_prefix): New function, used on + Windows to turn build-time paths from a gtk.immodules distributed + as part of a binary package into runtime ones in the + end-user-chosen installation directory. + (gtk_im_module_init): Use it for module path and domain + directory. + 2001-11-02 Tor Lillqvist * gtk/gtkrc.c (gtk_rc_make_default_dir): Fix typo: extraneous diff --git a/gtk/gtk.def b/gtk/gtk.def index 2a20f06451..38b5271df1 100755 --- a/gtk/gtk.def +++ b/gtk/gtk.def @@ -719,7 +719,6 @@ EXPORTS gtk_im_context_simple_new gtk_im_module_get_type gtk_im_multicontext_append_menuitems - gtk_im_multicontext_commit_cb gtk_im_multicontext_get_type gtk_im_multicontext_new gtk_image_get @@ -1256,10 +1255,8 @@ EXPORTS gtk_selection_data_free gtk_selection_data_get_targets gtk_selection_data_get_text - gtk_selection_data_get_tree_row gtk_selection_data_set gtk_selection_data_set_text - gtk_selection_data_set_tree_row gtk_selection_data_targets_include_text gtk_selection_incr_event gtk_selection_notify @@ -1721,6 +1718,7 @@ EXPORTS gtk_tree_drag_source_drag_data_delete gtk_tree_drag_source_drag_data_get gtk_tree_drag_source_get_type + gtk_tree_get_row_drag_data gtk_tree_get_type gtk_tree_insert gtk_tree_item_collapse @@ -1816,6 +1814,7 @@ EXPORTS gtk_tree_selection_unselect_all gtk_tree_selection_unselect_iter gtk_tree_selection_unselect_path + gtk_tree_set_row_drag_data gtk_tree_set_selection_mode gtk_tree_set_view_lines gtk_tree_set_view_mode @@ -1848,7 +1847,6 @@ EXPORTS gtk_tree_view_collapse_row gtk_tree_view_column_add_attribute gtk_tree_view_column_cell_draw_focus - gtk_tree_view_column_cell_event gtk_tree_view_column_cell_focus gtk_tree_view_column_cell_get_size gtk_tree_view_column_cell_is_visible diff --git a/gtk/gtkimmodule.c b/gtk/gtkimmodule.c index ea40819e37..1be18f554d 100644 --- a/gtk/gtkimmodule.c +++ b/gtk/gtkimmodule.c @@ -33,6 +33,7 @@ #include #include "gtkimmodule.h" #include "gtkimcontextsimple.h" +#include "gtkprivate.h" #include "gtkrc.h" #include "config.h" #include "gtkintl.h" @@ -222,6 +223,28 @@ add_module (GtkIMModule *module, GSList *infos) modules_list = g_slist_prepend (modules_list, module); } +#ifdef G_OS_WIN32 +static void +correct_libdir_prefix (gchar **path) +{ + if (strncmp (*path, GTK_LIBDIR, strlen (GTK_LIBDIR)) == 0) + { + /* This is an entry put there by make install on the + * packager's system. On Windows a prebuilt GTK+ + * package can be installed in a random + * location. The gtk.immodules file distributed in + * such a package contains paths from the package + * builder's machine. Replace the path with the real + * one on this machine. + */ + gchar *tem = *path; + *path = g_strconcat (GTK_LIBDIR, tem + strlen (GTK_LIBDIR), NULL); + g_free (tem); + } +} +#endif + + static void gtk_im_module_init () { @@ -280,6 +303,9 @@ gtk_im_module_init () } module->path = g_strdup (tmp_buf->str); +#ifdef G_OS_WIN32 + correct_libdir_prefix (&module->path); +#endif g_type_module_set_name (G_TYPE_MODULE (module), module->path); } else @@ -303,6 +329,9 @@ gtk_im_module_init () if (!pango_scan_string (&p, tmp_buf)) goto context_error; info->domain_dirname = g_strdup (tmp_buf->str); +#ifdef G_OS_WIN32 + correct_libdir_prefix (&info->domain_dirname); +#endif if (!pango_scan_string (&p, tmp_buf)) goto context_error; -- 2.30.2